Package-level declarations

Types

Link copied to clipboard
class CallbackContinuation<in T>(cb: (Result<T>) -> Unit) : Continuation<T>

An async continuation that just calls a callback when the result is available

Link copied to clipboard
interface Continuation<in T> : Logging

A deferred execution object (with various possible implementations)

Link copied to clipboard

Sometimes when starting services we face situations where messages come in that require computation but we can't do that computation yet because we are still waiting for some long running init to complete.

Link copied to clipboard

This is a blocking/threaded version of coroutine Continuation

Functions

Link copied to clipboard
fun CoroutineScope.handledLaunch(context: CoroutineContext = EmptyCoroutineContext, start: CoroutineStart = CoroutineStart.DEFAULT, block: suspend CoroutineScope.() -> Unit): Job
Link copied to clipboard
fun <T> suspend(timeoutMsecs: Long = -1, initfn: (SyncContinuation<T>) -> Unit): T

Calls an init function which is responsible for saving our continuation so that some other thread can call resume or resume with exception.